﻿Imports System.ComponentModel

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class ucDiplomaRequirementDetails
	Inherits UcBaseEditControl
	Implements IUcEditControl

#Region "Designer"
	'UserControl overrides dispose to clean up the component list.
	<System.Diagnostics.DebuggerNonUserCode()> _
	Protected Overrides Sub Dispose(ByVal disposing As Boolean)
		Try
			If disposing AndAlso components IsNot Nothing Then
				components.Dispose()
			End If
		Finally
			MyBase.Dispose(disposing)
		End Try
	End Sub

	Public Sub New()

		' This call is required by the designer.
		InitializeComponent()

		' Add any initialization after the InitializeComponent() call.

	End Sub

	'Required by the Windows Form Designer
	Private components As System.ComponentModel.IContainer

	'NOTE: The following procedure is required by the Windows Form Designer
	'It can be modified using the Windows Form Designer.  
	'Do not modify it using the code editor.
	<System.Diagnostics.DebuggerStepThrough()> _
	Private Sub InitializeComponent()
		Me.components = New System.ComponentModel.Container()
		Me.DiplomaTypeIdlbl = New System.Windows.Forms.Label()
		Me.DiplomaTypeId = New org.codegen.win.controls.CGComboBox(Me.components)
		Me.CertificationTypeIdlbl = New System.Windows.Forms.Label()
		Me.CertificationTypeId = New org.codegen.win.controls.CGComboBox(Me.components)
		
		
		Me.SuspendLayout()
		'
		'DiplomaTypeIdlbl
		'
		Me.DiplomaTypeIdlbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.DiplomaTypeIdlbl.Location = New System.Drawing.Point(5, 15)
		Me.DiplomaTypeIdlbl.Name = "DiplomaTypeIdlbl"
		Me.DiplomaTypeIdlbl.Size = New System.Drawing.Size(120, 20)
		Me.DiplomaTypeIdlbl.TabIndex = 0
		Me.DiplomaTypeIdlbl.Text = "Diploma"
		Me.DiplomaTypeIdlbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
		'
		'DiplomaTypeId
		'
		Me.DiplomaTypeId.AssociatedLabel = Me.DiplomaTypeIdlbl
		Me.DiplomaTypeId.BackColor = System.Drawing.Color.LightYellow
		Me.DiplomaTypeId.ErrProvider = Nothing
		Me.DiplomaTypeId.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.DiplomaTypeId.isMandatory = True
		Me.DiplomaTypeId.Location = New System.Drawing.Point(135, 15)
		Me.DiplomaTypeId.MaxLength = 255
		Me.DiplomaTypeId.MaxValue = Nothing
		Me.DiplomaTypeId.MinValue = Nothing
		Me.DiplomaTypeId.Name = "DiplomaTypeId"
		Me.DiplomaTypeId.Size = New System.Drawing.Size(357, 21)
		Me.DiplomaTypeId.TabIndex = 0
		'
		'CertificationTypeIdlbl
		'
		Me.CertificationTypeIdlbl.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.CertificationTypeIdlbl.Location = New System.Drawing.Point(5, 45)
		Me.CertificationTypeIdlbl.Name = "CertificationTypeIdlbl"
		Me.CertificationTypeIdlbl.Size = New System.Drawing.Size(120, 20)
		Me.CertificationTypeIdlbl.TabIndex = 1
		Me.CertificationTypeIdlbl.Text = "Requirement"
		Me.CertificationTypeIdlbl.TextAlign = System.Drawing.ContentAlignment.MiddleRight
		'
		'CertificationTypeId
		'
		Me.CertificationTypeId.AssociatedLabel = Me.CertificationTypeIdlbl
		Me.CertificationTypeId.ErrProvider = Nothing
		Me.CertificationTypeId.Font = New System.Drawing.Font("Verdana", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.CertificationTypeId.isMandatory = False
		Me.CertificationTypeId.Location = New System.Drawing.Point(135, 45)
		Me.CertificationTypeId.MaxLength = 255
		Me.CertificationTypeId.MaxValue = Nothing
		Me.CertificationTypeId.MinValue = Nothing
		Me.CertificationTypeId.Name = "CertificationTypeId"
		Me.CertificationTypeId.Size = New System.Drawing.Size(357, 21)
		Me.CertificationTypeId.TabIndex = 1
		'
		
		'
		
		'
		'ucDiplomaRequirementDetails
		'
		Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
		Me.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange
		Me.Controls.Add(Me.DiplomaTypeIdlbl)
		Me.Controls.Add(Me.DiplomaTypeId)
		Me.Controls.Add(Me.CertificationTypeIdlbl)
		Me.Controls.Add(Me.CertificationTypeId)
		Me.Name = "ucDiplomaRequirementDetails"
		Me.Size = New System.Drawing.Size(807, 348)
		
		Me.ResumeLayout(False)
		Me.PerformLayout()

	End Sub

	

	Friend WithEvents DiplomaTypeIdlbl As System.Windows.Forms.Label
	Friend WithEvents DiplomaTypeId As CGComboBox
	Friend WithEvents CertificationTypeIdlbl As System.Windows.Forms.Label
	Friend WithEvents CertificationTypeId As CGComboBox


#End Region

#Region "Properties"

#End Region

#Region "Methods"

	''' <summary>
	''' Fills the controls on the screen from data in the object
	''' </summary>
	''' <remarks></remarks>
	Public Sub _loadData() Handles Me.evLoadObjectData


		Dim mo As DiplomaRequirement = DirectCast(Me.ModelObject(), DiplomaRequirement)
		Me.DiplomaTypeId.Value = mo.DiplomaTypeId
		Me.CertificationTypeId.Value = mo.CertificationTypeId





	End Sub

	''' <summary>
	''' Loads the object from the database and then sets the proeperties 
	''' of the object from values on the controls
	''' </summary>
	''' <remarks></remarks>
	Public Sub _loadToObject() Handles Me.evLoadToObject

		Dim mo As DiplomaRequirement = DirectCast(Me.ModelObject, DiplomaRequirement)
		mo.DiplomaTypeId = Me.DiplomaTypeId.intValue
		mo.CertificationTypeId = Me.CertificationTypeId.intValue


	End Sub

	Public Sub _InitializeControl() Handles Me.InitializeControl

		If Me.isInitialized = False Then
			'setup datasources here
			Me.DiplomaTypeId.DataSource = New BusObjects.Mappers.DiplomaTypeDBMapper().findAll()
			Me.DiplomaTypeId.DisplayMember = "DiplomaType"
			Me.DiplomaTypeId.ValueMember = "DiplomaTypeId"

			Me.CertificationTypeId.DataSource = New BusObjects.Mappers.CertificationTypeDBMapper().findAll()
			Me.CertificationTypeId.DisplayMember = "CertificationType"
			Me.CertificationTypeId.ValueMember = "CertificationTypeid"

			Me.isInitialized = True
		End If

	End Sub

#End Region

	Sub setCertsDatasource(ByVal crtsList As List(Of CertificationType))
		
		Me.CertificationTypeId.DataSource=crtsList
		Me.CertificationTypeId.SelectedItem = Nothing

	End Sub


End Class


